package com.shop.loan.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.EditType;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.upms.helper.HyperModelCreatorVo;

import javax.persistence.Entity;
import javax.persistence.Table;

@Erupt(
        name = "常见问题"
)
@Table(name = "s_question")
@Entity
@ApiModel("常见问题")
@Getter
@Setter
public class Question extends HyperModelCreatorVo {

    @EruptField(
            views = @View(title = "问题名称"),
            edit = @Edit(title = "问题名称", notNull = true)
    )
    @ApiModelProperty(name = "name", value = "问题名称", dataType = "string", example = "1")
    private String name;

    @EruptField(
            views = @View(title = "问题回答"),
            edit = @Edit(title = "问题回答", notNull = true, type = EditType.TEXTAREA)
    )
    @ApiModelProperty(name = "answer", value = "问题回答", dataType = "string", example = "1")
    private String answer;

    @EruptField(
            views = @View(title = "类型", show = false)
    )
    @ApiModelProperty(name = "type", value = "类型", dataType = "string", example = "1")
    private String type;

}
